package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.RechargePayMethod;
import com.njtoyo.taxi.admin.mapper.master.enums.RechargePayMode;
import com.njtoyo.taxi.admin.mapper.master.enums.RechargeState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-07-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Recharge对象", description = "")
@Accessors(chain = true)
public class Recharge implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String outTradeNo;

    private BigDecimal amount;

    private BigDecimal payAmount;

    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    private Long customerId;

    @ApiModelProperty(value = "0:unknown,1:cash,2:online,3:wxapp,4:wechat,5:alipay,6:saving,7:redpacket,8:jybwxapp,9:point,10:mixed,11:unionpay")
    private RechargePayMethod payMethod;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    @ApiModelProperty(value = "支付时间")
    private Date lastPayTime;

    @ApiModelProperty(value = "0:init,1:operated,2:done,3:cancelled,4:failed,5:rejected,6:front_end_done")
    private RechargeState state;

    @ApiModelProperty(value = "操作模式（add - 增加，reduct - 减少）")
    private Boolean operationMode;

    @ApiModelProperty(value = "支付模式(0-充值,1-车费支付,2-罚金支付)")
    private RechargePayMode payMode;

    @ApiModelProperty(value = "系统赠送金额")
    private BigDecimal donationAmount;

    private Boolean refunded;

    @ApiModelProperty(value = "支付渠道商单号")
    private String tradeNo;


}
